package com.cloudDemoUser.service.impl;

import com.cloudDemoUser.dao.UserQueryDao;
import com.cloudDemoUser.service.UserService;
import entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author Daft_V
 * @Date 2022/5/5 23:31
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    UserQueryDao userQueryDao;

    @Override
    public List<User> userList() {
        return userQueryDao.list();
    }

    @Override
    public User queryUserById(int id) {
        return userQueryDao.getById(id);
    }
}
